import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * Creater with IntelliJ IDEA.
 * Description:
 * User: 86152
 * Dae: 2022-08-06
 * Time: 9:57
 */
public class TcpEchoServer {
    private ServerSocket socket = null;
    public TcpEchoServer(int port) throws IOException {
        socket = new ServerSocket(port);
    }
    public void start() throws IOException {
        System.out.println("服务器启动");
        while(true) {
            Socket clientSocket = socket.accept();
            processConnect(clientSocket);
        }
    }
    public void processConnect(Socket clientSocket) {
        ;
    }
}
